Skip to content

[action] [PR:1052] Add test case to verify zmq reconnect behaviour#63

Merged
mssonicbld merged 1 commit intoAzure:202412from
mssonicbld:cherry/msft-202412/1052
Sep 10, 2025
Merged

[action] [PR:1052] Add test case to verify zmq reconnect behaviour#63
mssonicbld merged 1 commit intoAzure:202412from
mssonicbld:cherry/msft-202412/1052

Conversation

@mssonicbld
Copy link
Collaborator

This PR is a partial duplicate of sonic-net/sonic-dash-ha#84
Since crates/swss-common will be moved in this repo.

why

During investigating issue #75, I created test case to verify zmq behaviour in handling no connection and connection loss. It is found that with the current swss-common zmq implementation with below attributes, we don't need to handle reconnect explicitly.

  • PUSH/PULL model
  • ZMQ_IMMEDIATE = 0 (default)
  • ZMQ_SNDHWM = 10000

what this PR does

  • add unit test for zmq late connect and reconnect for regression
  • remove unneeded code for falling back to ProducerStateTable in test environment since zmq client won't fail if zmq server is not connected.
  • update test_utils/README.md with missing argument to start redis in test environment

This PR is a partial duplicate of sonic-net/sonic-dash-ha#84
Since crates/swss-common will be moved in this repo.

### why
During investigating issue #75, I created test case to verify zmq behaviour in handling no connection and connection loss. It is found that with the current swss-common zmq implementation with below attributes, we don't need to handle reconnect explicitly.

- PUSH/PULL model
- ZMQ_IMMEDIATE = 0 (default)
- ZMQ_SNDHWM = 10000

### what this PR does

- add unit test for zmq late connect and reconnect for regression
- remove unneeded code for falling back to ProducerStateTable in test environment since zmq client won't fail if zmq server is not connected.
- update test_utils/README.md with missing argument to start redis in test environment
@mssonicbld
Copy link
Collaborator Author

Original PR: sonic-net/sonic-swss-common#1052

@mssonicbld
Copy link
Collaborator Author

/azp run

@mssonicbld mssonicbld merged commit 9e5b094 into Azure:202412 Sep 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant